<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE html>
<html>    
    <head>        
        <link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Rentpad.com.ph</title>   
        <style>
            @font-face
            {
                font-family: avant;
                src: url('${model.props.appPath}/fonts/avangmi-webfont.ttf');
            }
            -webkit-overflow-scrolling: touch; 
        </style>           
        <style>
            a {color:#404042;text-decoration:none;}      /* unvisited link */
            a:visited {color:#404042;}  /* visited link */
            a:hover {color:#404042;}  /* mouse over link */
            a:active {color:#404042;}  /* selected link */
        </style>      
        <script type="text/javascript" src="${model.props.appPath}/js/jquery/jquery-1.8.3.min.js"></script>
        <script type="text/javascript" src="${model.props.appPath}/js/block/jquery.blockUI.js"></script>  
        <script type="text/javascript">
            function submitForm() {
                $.blockUI({ message: "<div style='font-family: Century Gothic, Calibri, Verdana; padding: 10px;'>Retrieving Password ...</div>" });
                $("form#formID").submit();
            }
        </script>
        
    </head>

    <body style="text-align: center; background-color: #FAFAFA; color: #404042; font-family:avant, Century Gothic, Verdana; padding: 0px; margin: 0px;" >

        <div style="margin-top: 0px; background-color: white;">

            <%@include file="header.jsp" %>

            <div style="width: 100%; text-align: left; font-family:avant, Century Gothic, Calibri, Verdana; color: #404042; background-color: white; background: url('${model.props.appPath}/img/content-bg-short.jpg'); background-repeat: repeat-x;">

                
                <div style="width: 850px; margin-top: 10px; margin: 0 auto;">

                    <br><br> 
                    
                    <h1>&nbsp;Retrieve password</h1>

                    <hr>

                    <c:choose>
                        <c:when test="${model.submit == 0}">                            
                            <form id="formID" action="password.htm">
                                <table cellpadding="5" cellspacing="5" style="margin-left:0px; background-color: #f7f7f7; padding: 10px;">
                                    <tr>
                                        <td style="font-size: 18px; font-weight: normal; vertical-align: middle; padding-top:10px;">&nbsp;&nbsp;&nbsp;&nbsp;Enter email that you used:</td>
                                        <td>
                                            <input name="email" type="text" style="width:400px; padding: 10px" value=""/>

                                        </td>
                                        <td>
                                            <table style="width: 100%; ">
                                                <tr>
                                                    <td>
                                                    </td>                                
                                                    <td align="right">
                                                        <input type="hidden" name="s" value="1" />
                                                        <input type="button" value="   Submit   "style="padding: 7px" onclick="submitForm();"/>
                                                    </td>
                                                </tr>        
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </form>                        
                        </c:when>
                        <c:otherwise>
                            <c:choose>
                                <c:when test="${model.success == 1}">
                                    <p>&nbsp;&nbsp;&nbsp;&nbsp;<b style="color: green;">Success!</b> Your login details are sent to your email. Make sure you also check your SPAM folder. =)</b></p>
                                </c:when>
                                <c:otherwise>
                                    <p>&nbsp;&nbsp;&nbsp;&nbsp;<b style="color: red;">Failed.</b> We could not recognize this email. Maybe you would like to <a href="password.htm" style="color:#369; text-decoration: underline;">try again</a> or <a href="signup.htm" style="color:#369; text-decoration: underline;">sign up</a> with this email?</b></p>                                    
                                </c:otherwise>
                            </c:choose>                            
                        </c:otherwise>
                    </c:choose>

                    <br><br>
                    <br><br> 
                    <br><br> 
                    <br><br> 
                    <br><br> 
                </div>
                
            </div>

            
            <%@include file="footer.jsp" %>
            
        </div>
    </body>
</html>
